package cn.juque.workflow.config;

import cn.juque.jdfsystem.api.FileInfoClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

/**
 * @author juque
 * @version 1.0.0
 * <ul>
 *     <li>JdfSystemConfig</li>
 * </ul>
 * @date 2023-01-20 16:23:46
 **/
@Configuration
@Slf4j
public class JdfSystemConfig {

    @Value("#{'${jdf.ip-list}'.split(',')}")
    private List<String> ipList;

    @Value("${jdf.platform-id}")
    private String platformId;

    @Value("${jdf.secret}")
    private String secret;

    @Bean
    public FileInfoClient fileInfoClient() {
        return new FileInfoClient(ipList, platformId, secret);
    }


}
